0 || strpos($file, "Lab_Report_Assignments"))) || $_SESSION['user_type'] == "Lecturer" || $_SESSION['user_type'] == "TA" ) { // 发送文件头部 header("Content-type: $type"); header('Content-Disposition: attachment;filename="'.urldecode($filename).'"'); header("Content-Transfer-Encoding: binary"); header('Pragma: no-cache'); header('Expires: 0'); // 发送文件内容 set_time_limit(0); readfile($file); } else { echo "Nothing to download. Contact lanhui _at_ zjnu.edu.cn if you think otherwise."; } ?>